﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IEthnic
    {
        [OperationContract]
        int Ethnic_Using(int EthnicID);

        [OperationContract]
        DataSet Ethnic_GetAll();

        [OperationContract]
        EthnicInfo Ethnic_GetInfo(int EthnicID);

        [OperationContract]
        DataSet Ethnic_GetList(out int ItemCount, int currentPage, int pageSize);

        [OperationContract]
        int Ethnic_Insert(EthnicInfo eInfo);

        [OperationContract]
        bool Ethnic_Update(EthnicInfo eInfo);

        [OperationContract]
        bool Ethnic_Delete(int EthnicID);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class EthnicInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
       
        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
    }
}
